# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-inquirer
_pkgname=inquirer
pkgver=3.4.0
_pyver=3.13
pkgrel=4
pkgdesc='Collection of common interactive command line user interfaces, based on Inquirer.js.'
arch=('any')
url='https://pypi.org/project/inquirer/#files'
license=('MIT')
depends=('python')
makedepends=('python-pip' 'python-build' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('6b6458f61a4baffe164c6a2111788739efd8a0725d822307ba411d5d23c4ab0e8cf0af8aefe1c62b9190a42a4dad1c4c0f0d0e898494671bf2a8c935549241fc')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname

  rm -rf "$pkgdir/usr/lib/python$_pyver/site-packages/tests/"
}

